using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._TerrainDataset
{
    /// <summary>
    /// <para>Build Terrain</para>
    /// <para>Performs tasks required for analyzing and displaying a terrain dataset.</para>
    /// <para>执行分析和显示地形数据集所需的任务。</para>
    /// </summary>    
    [DisplayName("Build Terrain")]
    public class BuildTerrain : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public BuildTerrain()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_terrain">
        /// <para>Input Terrain</para>
        /// <para>The terrain dataset to process.</para>
        /// <para>要处理的 terrain 数据集。</para>
        /// </param>
        public BuildTerrain(object _in_terrain)
        {
            this._in_terrain = _in_terrain;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Build Terrain";

        public override string CallName => "3d.BuildTerrain";

        public override List<string> AcceptEnvironments => ["autoCommit", "extent", "workspace"];

        public override object[] ParameterInfo => [_in_terrain, _update_extent.GetGPValue(), _derived_out_terrain];

        /// <summary>
        /// <para>Input Terrain</para>
        /// <para>The terrain dataset to process.</para>
        /// <para>要处理的 terrain 数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Terrain")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_terrain { get; set; }


        /// <summary>
        /// <para>Update Extent</para>
        /// <para><xdoc>
        ///   <para>Recalculates the data extent of a window-size-based terrain dataset when the data area has been reduced through editing. It is not needed if the data extent has increased or if the terrain dataset is z-tolerance based. It will scan through all the terrain data to determine the new extent.</para>
        ///   <bulletList>
        ///     <bullet_item>Maintain Extent— The extent of the terrain dataset will not be recalculated. This is the default.</bullet_item><para/>
        ///     <bullet_item>Update Extent— The extent of the terrain dataset will be recalculated.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>当数据区域通过编辑缩小时，重新计算基于窗口大小的 terrain 数据集的数据范围。如果数据范围已增加，或者地形数据集基于 z 容差，则不需要这样做。它将扫描所有地形数据以确定新范围。</para>
        ///   <bulletList>
        ///     <bullet_item>维护范围 - 不会重新计算 terrain 数据集的范围。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>更新范围- 将重新计算地形数据集的范围。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Update Extent")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _update_extent_value _update_extent { get; set; } = _update_extent_value._NO_UPDATE_EXTENT;

        public enum _update_extent_value
        {
            /// <summary>
            /// <para>Maintain Extent</para>
            /// <para>Maintain Extent— The extent of the terrain dataset will not be recalculated. This is the default.</para>
            /// <para>维护范围 - 不会重新计算 terrain 数据集的范围。这是默认设置。</para>
            /// </summary>
            [Description("Maintain Extent")]
            [GPEnumValue("NO_UPDATE_EXTENT")]
            _NO_UPDATE_EXTENT,

            /// <summary>
            /// <para>Update Extent</para>
            /// <para>Update Extent— The extent of the terrain dataset will be recalculated.</para>
            /// <para>更新范围- 将重新计算地形数据集的范围。</para>
            /// </summary>
            [Description("Update Extent")]
            [GPEnumValue("UPDATE_EXTENT")]
            _UPDATE_EXTENT,

        }

        /// <summary>
        /// <para>Updated Input Terrain</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Terrain")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _derived_out_terrain { get; set; }


        public BuildTerrain SetEnv(int? autoCommit = null, object extent = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, extent: extent, workspace: workspace);
            return this;
        }

    }

}